<html>

<head>

<script type="text/javascript" 
src="http://yui.yahooapis.com/combo?2.9.0/build/yahoo-dom-event/yahoo-dom-event.js">
</script>

<style type="text/css">

#container{
	background-color: 	#00CCFF;
	border: 			1px;
	padding: 			1em;
	cursor: 			pointer;
};

</style>

</head>

<body>

<div id="container">
	<p>click for alert</p>
</div>

<script type="text/javascript">
	function helloWorld(e){
		alert("hello world");
	}
	YAHOO.util.Event.addListener("container", "click", helloWorld);
</script>

</body>

</html>